home *** CD-ROM | disk | FTP | other *** search
- Subject: Re:Undo Set Property
- Sent: 8/7/96 7:18 PM
- Received: 8/8/96 8:57 AM
- From: Greg Friedman, friedman@cognosis.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- Serge Froment wrote:
- > I've thought more about my part design and I am currently considering
- > changing my Apple Events so my properties are independent of each other. In
- > that case, the current implementation of FW_CSetPropertyCommand will suit
- > my needs.
-
- Either way, I think it should work.
-
- > The main problem I have is that some of my properties are related to each
- > other. When I set them independantly, the part data as a whole may become
- > invalid. What I do now is adjusting other properties so the part data is
- > always valid.
- >
- > Is it possible to set several properties of a part with a single Apple Event?
-
- It is, but I suggest you don't force your users to do it. FW_MScriptable
- has a method called SetProperties. This method should get called when users
- send a create event, and include property data for the new element. You can
- see this at work in ODFDraw for events like:
-
- make new shape with {color : red, location : {0, 0}}
-
- You might also decide to support a "properties" property to implement
- similar functionality for setting groups of properties of existing objects.
- For example:
-
- set properties of shape 1 to {color : red, location : {0, 0}}
-
- I'll put this functionality into ODFDraw Release 2 so you can see how it
- works.
-
- > In the case I keep my current Apple Event design, a
- > FW_MScriptable::SaveProperty method can solve my problem, but then I also
- > need a RestoreProperty method to be called when undoing.
-
- RestoreProperty is already there.
-
- Greg.
-
-
- ___________________________________________________________
- Greg Friedman ODF Engineering Apple Computer
-
-
-